﻿using Microsoft.Phone.Controls;
using System.Net;
using System.Windows;
using System;
using System.Collections.Generic;
using wp7cinema.View.Twitter;
using wp7cinema.Common;

namespace wp7cinema
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();

            ReviewBtn.Click += new RoutedEventHandler(ReviewBtn_Click);
        }

        void ReviewBtn_Click(object sender, RoutedEventArgs e)
        {
            var _twitterSettings = Helper.LoadSetting<TwitterAccess>(TwitterHelper.TwitterAccess);
            string url;
            if (_twitterSettings == null)
                url = "/View/Twitter/TwitterAuthPage.xaml";
            else url = "/View/Twitter/TwitterMain.xaml";

            NavigationService.Navigate(new Uri(url, UriKind.Relative));
        }
    }
}
